package com.atguigu.springcloud.cloudsentinelgatewaydevelop.mapper;

import com.atguigu.springcloud.cloudsentinelgatewaydevelop.bean.DO.RouteDefinitionDO;

import org.springframework.data.r2dbc.repository.Modifying;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface RouteDefinitionMapper extends R2dbcRepository<RouteDefinitionDO,String> {
    @Query("select * from ROUTE_DEFINITION limit :offset , :size ")
    public Flux<RouteDefinitionDO> getPageList(int offset,int size);
    @Query("select * from ROUTE_DEFINITION where ROUTE_ORDER = :routeId")
    public Mono<RouteDefinitionDO> getByRouteId(String routeId);
}
